import Vue from 'vue'
import VueRouter from 'vue-router'

const MainWindows = () => import('../views/MainWindows.vue')
const Main = () => import('../views/Main.vue')
const PaintingPanel = () => import('../views/PaintingPanel.vue')
const TestPanel = () => import('../components/TestPanel.vue')
const threeDWindows = () => import('../views/threeDWindows.vue')

Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: '/mainwindows',
  },
  {
    path: '/mainwindows',
    name: 'mainwindows',
    component: MainWindows,
  },
  {
    path: '/paintingpanel',
    name: 'paintingpanel',
    component: PaintingPanel,
  }, {
    path: '/testpanel',
    name: 'testpanel',
    component: TestPanel,
  }, {
    path: '/threedwindows',
    name: 'threedwindows',
    component: threeDWindows,
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import( /* webpackChunkName: "about" */ '../views/About.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router